package com.evil.account.util;

import com.evil.account.constant.AccountConstant;
import com.evil.common.core.util.GenerateUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.function.Function;

/**
 * @author liyang
 * @date 2023-01-15 21:17
 */
@Slf4j
public class RoleCodeUtil implements AccountConstant {

    /**
     * 生成key
     *
     * @return String
     */
    public static String generateKey(Function<String, Boolean> checkDuplicateFun) {
        // 生成应用key
        return GenerateUtil.generateKey(new GenerateUtil.DefaultRandomType(), checkDuplicateFun);
    }
}
